// import { ElButton } from "element-plus"
import action from "@/utils/action.js"
// ElButton.emits.click = async(evt) => {
//   console.log('matomo');
//   action.handleMatomo({
//     event: evt.target.innerText
//   })
//   return evt
// }
export function initMatomo(app) {
  app.directive("matomo", {
    mounted(el, binding, vnode, prevNode) {
      el.addEventListener("click", (event) => {
        action.handleMatomo({
          event: event.target.innerText,
        })
      })
    },
  })
}
